home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / info-service / gopher / Mac_server / Gophers_Helper.hqx / Gopher's Helper / stack_-1.xml < prev    next >
Encoding:
Extensible Markup Language  |  1992-03-18  |  4.0 KB  |  16 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>1</cardCount>
  7.     <cardID>2828</cardID>
  8.     <listID>3903</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>448</width>
  14.         <height>256</height>
  15.     </cardSize>
  16.     <script>--Gopher's Helper v0.1b2
  17. --fxa.
  18.  
  19. ------------------------------------------------------------------
  20.  
  21. on getCat selector   ------------ΓêåΓêå
  22. global gName, gSelector, gLongName
  23. dCInfo selector, "gName", "gSelector", "gLongName"
  24. put gName into card field "PhyName"
  25. put gLongName into card field "LongName"
  26. --set the scroll of card field "DisplayStuff" to 0
  27. if the number of lines in card field "CtrlStack" = 1 then
  28. hide card btn "Up"
  29. end if
  30. end getCat
  31.  
  32.  
  33. function checkAlias fName  --true if there was a true alias, not just a name
  34. global gCPathName, gCAliasName, gCHostName, gCPort, gCServerSel, gCItemType
  35. if last char of fName is ":" then delete last char of fName
  36. put fName into gCPathName
  37. put "ΓÇó" after fName
  38. if there is a file fName then --check alias
  39. open file fName
  40. read from file fName for 5255
  41. put line 1 of it into gCAliasName
  42. put line 2 of it into gCHostName
  43. put line 3 of it into gCPort
  44. put line 4 of it into gCServerSel
  45. put line 5 of it into gCItemType
  46. close file fName
  47. if gCHostName & gCPort & gCServerSel & gCItemType is empty then
  48. return false
  49. else
  50. return true
  51. end if
  52. else -- go ahead and open it
  53. put empty into gCAliasName
  54. put empty into gCHostName
  55. put empty into gCPort
  56. put empty into gCServerSel
  57. put empty into gCItemType
  58. return false
  59. end if
  60. end checkAlias
  61.  
  62. function SampleTheFile fName  ------------ΓêåΓêå
  63. if there is a file fName then
  64. open file fName
  65. read from file fName for 10000
  66. put it into fCon
  67. close file fName
  68. if length(fCon) < 10000 then
  69. return fCon
  70. else
  71. return fCon & return & "ΓÇóΓÇóΓÇóΓÇóΓÇó Sample of file contents only ΓÇóΓÇóΓÇóΓÇóΓÇó" &┬¼
  72. return & "ΓÇóΓÇóΓÇóΓÇóΓÇó Entire file is not displayed ΓÇóΓÇóΓÇóΓÇóΓÇó"
  73. end if
  74. else
  75. return "ΓÇóΓÇóΓÇóΓÇóΓÇó File not found ΓÇóΓÇóΓÇóΓÇóΓÇó"
  76. end if
  77. end SampleTheFile
  78.  
  79.  
  80. on UpdateAliasFile fName
  81. global gCAliasName, gCHostName, gCPort, gCServerSel, gCItemType
  82. if last char of fName is ":" then delete last char of fName
  83. put "ΓÇó" after fName
  84. if not (there is a file fName) then
  85. dCInfo fName
  86. end if
  87. open file fName
  88. write (line 1 of gCAliasName) & return & gCHostName &┬¼
  89. return & gCPort & return & gCServerSel & return & gCItemType &┬¼
  90. return to file fName
  91. close file fName
  92. getCat line 1 of card field "CtrlStack"
  93. end UpdateAliasFile
  94.  
  95. on doLinkTo
  96. global gCPathName, gCAliasName, gCHostName, gCPort, gCServerSel, gCItemType
  97. lock screen
  98. show card field "TableCloth"
  99. show card field "FakeDlg"
  100. show card field "DoWhat"
  101. show card field "too"
  102. if word 1 of gCAliasName is empty then
  103. put tail(gCPathName) into card field "LNameLabel"
  104. else
  105. put gCAliasName into card field "LNameLabel"
  106. end if
  107. show card field "LNameLabel"
  108. put gCHostName into card field "DlgHostName"
  109. show card field "DlgHostName"
  110. if gCHostName is not empty then --it is probably a real link
  111. put gCPort into card field "LPort"
  112. end if
  113. -- if gCPort = 70 then
  114. -- put empty into card field "LPort"
  115. -- else
  116. -- put gCPort into card field "LPort"
  117. -- end if
  118. show card field "LPort"
  119. if gCServerSel <> "Γêæ" then
  120. put gCServerSel into card field "LServerSel"
  121. else
  122. put empty into card field "LServerSel"
  123. end if
  124. show card field "LServerSel"
  125. put gCItemType into card field "LExplicitType"
  126. show card field "LExplicitType"
  127. show btn "Link"
  128. show btn "Clear"
  129. show btn "Cancel"
  130. show btn "Help"
  131. show btn "HelpB"
  132. unlock screen
  133. end doLinkTo
  134.  
  135. on doClearLink linkLine
  136. global gCAliasName, gCHostName, gCPort, gCServerSel, gCItemType, gSelector
  137. answer "Clear the currently existing link for item " & quote &┬¼
  138. gCAliasName & quote & "?" with "Clear" or "Cancel"
  139. if it is "Clear" then
  140. put empty into gCHostName
  141. put empty into gCPort
  142. put empty into gCServerSel
  143. put empty into gCItemType
  144. updateAliasFile line linkL